package com.osfw.activiti.service.running;


import com.baomidou.mybatisplus.extension.service.IService;
import com.osfw.activiti.domain.ProcessApproval;
import com.osfw.activiti.domain.ProcessExecResult;
import com.osfw.activiti.entity.running.ActRuExec;
import com.osfw.activiti.entity.running.ActRuTask;
import com.osfw.system.entity.manage.SysUser;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 流程任务表 服务层
 */
public interface IActRuTaskService extends IService<ActRuTask> {

    /**
     * 初始化任务数据
     *
     * @param execinsts 流程执行数据
     */
    boolean init(ProcessExecResult execResult);

    /**
     * 当前任务审批同意
     *
     * @param approval    审批信息
     * @param sysUser     办理人
     * @param currentTime 当前时间
     */
    boolean agree(ProcessApproval approval, SysUser sysUser, Date currentTime, ProcessExecResult execResult);

    /**
     * 当前任务审批退回
     *
     * @param approval    审批信息
     * @param sysUser     办理人
     * @param currentTime 当前时间
     */
    boolean goback(ProcessApproval approval, SysUser sysUser, Date currentTime, ProcessExecResult execResult);

    /**
     * 当前任务审批不同意
     *
     * @param approval    审批信息
     * @param sysUser     办理人
     * @param currentTime 当前时间
     */
    boolean disagree(ProcessApproval approval, SysUser sysUser, Date currentTime, ProcessExecResult execResult);

}
